#include <utility>
#include <tuple>
#include <type_traits>
#include <iostream>

using namespace std;

template <typename Ty, typename... Args>
pair<const size_t, Ty>* makePair(size_t k, Args... args)
{
	return new pair<const size_t, Ty>(piecewise_construct, tuple<size_t>(k), tuple<Args...>(args...));
}

struct A
{
	size_t _a = 0, _b = 0;
	A(size_t a, size_t b) : _a(a), _b(b) {}
};
ostream& operator<<(ostream& os, const A& a) { return os << "{" << a._a << "," << a._b << "}"; }

struct B
{
	size_t _a = 0, _b = 0;
	B(size_t a, size_t b) : _a(a), _b(b) {}
	B(const B&) = delete;
	B(B&&) = delete;
};
ostream& operator<<(ostream& os, const B& b) { return os << "{" << b._a << "," << b._b << "}"; }

int main()
{
	auto pInt = makePair<size_t>(1, 10);
	cout << pInt->first << "," << pInt->second << endl;
	auto pA = makePair<A>(1, 10, 20);
	cout << pA->first << "," << pA->second << endl;
	auto pB = makePair<B>(1, 10, 20);
	cout << pB->first << "," << pB->second << endl;


	return 0;
}